<?php 
    //Lay thong tin ve usis
    $content = array();
    $condsDefault = $this->String->condsDefault();
    $condsDefault = array_merge($condsDefault,array('NodeTerm.term_id' => 5));
    $fields = $this->String->nodeFields();
    $order = $this->String->orderFields();
    $opt = array(
        'conditions' => $condsDefault,
        'find' => 'all',
        'fields' => $fields,
        'order' => array('Node.created' => 'asc'),
        'locale' => true
    );
    $content = $this->String->get_data('Node','NodeTerm',$opt);
    //Lay thong tin khach hang chia se
    $customerShare = array();
    $condsDefault = $this->String->condsDefault();
    $condsDefault = array_merge($condsDefault,array('Node.node_type_id' => 9));
    $fields = $this->String->nodeFields();
    $order = $this->String->orderFields();
    $opt = array(
        'conditions' => $condsDefault,
        'find' => 'first',
        'fields' => $fields,
        'order' => 'rand()',
        'locale' => true
    );
    $customerShare = $this->String->get_data('Node','Node',$opt);
?>
<?php if(!empty($content)):?>
    <div class="tabpanel-cus" role="tabpanel">
        <!-- Nav tabs -->
        <ul class="nav nav-tabs cl-mytabs mytabs-cus mytabs-nbdcus">
            <?php $i=0;foreach($content as $key => $values):?>
                <?php if($i==0) $classActive = 'active';?>
                <li class="item <?php echo $classActive;?>"><a href="#item-<?php echo $values['Node']['id'];?>" data-toggle="tab"><?php echo $values['Node']['title'];?></a></li>
                <?php $classActive='';$i++;endforeach;?>
            <li class="item"><a href="#item-share" data-toggle="tab"><?php echo __d('default','KHÁCH HÀNG CHIA SẺ');?></a></li>
        </ul>
        <!-- Tab panes -->
        <div class="tab-content">
            <?php $i=0;foreach($content as $key => $values):?>
                <?php if($i==0) $classActive = 'in active';?>
                <div class="tab-pane tab-pane-bgtop fade <?php echo $classActive;?>" id="item-<?php echo $values['Node']['id'];?>">
                    <div class="tabs-pane-content-full asbl-rct-cus-slide">
                        <div class="flexslider flexslider-cal-nona">
                            <?php echo $values['Node']['field_body'];?>
                        </div>
                    </div>
                </div>
                <?php $classActive='';$i++;endforeach;?>
            <div class="tab-pane tab-pane-bgtop fade" id="item-share">
                <div class="tabs-pane-content-full asbl-rct-cus-slide">
                    <div class="flexslider flexslider-cal-nona">
                        <ul class="slides">
                            <li class="item">
                                <div class="blockquote-ct">
                                    <h3 class="tt-itl"><a href="#" class="txt-lk-bl"><?php echo $customerShare['Node']['title']?>  <?php echo date('d/m/Y',$customerShare['Node']['created']);?></a></h3>
                                    <p><?php echo $customerShare['Node']['field_description'];?></p>
                                </div>
                                <p class="tar">
                                    <a href="<?php echo $this->Html->url(array('plugin' => 'View','controller' => 'View','action' => 'customer_share'))?>" class="show-more-link"><?php echo __d('default','Xem thêm');?> »</a>
                                </p>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <?php endif;?>